package com.arron.test;

public class FactoryProducer {
    public static AbstractFactory getFactory(String name) {
        if (name == null)
            return null;
        if (name.equalsIgnoreCase("SHAPE"))
            return new ShapeFactory();
        if (name.equalsIgnoreCase("COLOR"))
            return new ColorFactory();
        return null;
    }
}
